import { createPinia } from "pinia";

import useLoginStote from "./login";
import useAllDataStore from "./all";

const pinia = createPinia();

function registerStore(app) {
  app.use(pinia);

  //加载本地数据
  const loginStore = useLoginStote();
  loginStore.loadLocalLogin();

  // 加载部门和角色数据
  const allStore = useAllDataStore();
  allStore.loadLocalAllDataList("department");
  allStore.loadLocalAllDataList("role");
}

export default registerStore;
